from detectron2.config.defaults import _C
from detectron2.config import CfgNode as CN

_CC = _C

_CC.MODEL.BACKBONE.FREEZE = False
_CC.MODEL.BACKBONE.FREEZE_AT = 3

_CC.MODEL.RPN.FREEZE = False
_CC.MODEL.RPN.ENABLE_DECOUPLE = False
_CC.MODEL.RPN.BACKWARD_SCALE = 1.0

_CC.MODEL.ROI_HEADS.NAME = "Res5ROIHeads"
_CC.MODEL.ROI_HEADS.FREEZE_FEAT = False
_CC.MODEL.ROI_HEADS.ENABLE_DECOUPLE = False
_CC.MODEL.ROI_HEADS.BACKWARD_SCALE = 1.0
_CC.MODEL.ROI_HEADS.OUTPUT_LAYER = "FastRCNNOutputLayers"
_CC.MODEL.ROI_HEADS.CLS_DROPOUT = False
_CC.MODEL.ROI_HEADS.DROPOUT_RATIO = 0.8
_CC.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION = 7  # for faster

_CC.TEST.CMCLIP_ENABLE = False
_CC.TEST.CMCLIP_MODELPATH = ""
_CC.TEST.CMCLIP_ALPHA = 0.70
_CC.TEST.CMCLIP_UPPER = 1.0
_CC.TEST.CMCLIP_LOWER = 0.05
_CC.SOLVER.ACCUMULATE_ITER = 1

_CC.SOLVER.WEIGHT_DECAY = 5e-5
_CC.SOLVER.WEIGHT_DECAY_BIAS = 5e-5
_CC.MUTE_HEADER = True

_CC.MODEL.ROI_HEADS.CLS_LOSS_TYPE = 'cross_entropy'
_CC.MODEL.ROI_HEADS.ALPHA = 1.0
_CC.MODEL.ROI_HEADS.EPSILON = 0.0
_CC.MODEL.ROI_HEADS.GAMMA = 0.0
_CC.MODEL.ROI_HEADS.BG_WEIGHT = 1.0